import request from '../utils/request'

export function fetchList(params: any) {
  return request({
    url: '/file/v1/list',
    method: 'get',
    params: params
  })
}

export function uploadUserFile(data: FormData) {
  return request({
    url: '/file/v1/upload',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

export function deleteUserFile(id: number) {
  return request({
    url: `/file/v1/delete/${id}`,
    method: 'delete'
  })
}
